package com.jsj.mapper;


import com.jsj.pojo.Repair;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface RepairMapper {

    Boolean addRepair(Repair repair);
    List<Repair> queryAllRepair();
    List<Repair> queryRepairByName(String deviceName);
    Boolean updateRepairById(Repair repair);

    Boolean repairedAndReturn(@Param("repairId") int repairId,@Param("returnTime") Date returnTime, @Param("repairStatus") String repairStatus);
    //查询repair_status，未审核
    List<Repair> queryRepairByStatus(@Param("status") String status);
    Boolean delRepairById(int repairId);
    //根据审核状态查询--未审核
    List<Repair> queryCheckStatus(String status);
    //根据审核状态查询--同意拒绝
    List<Repair> queryChecked(@Param("status1") String status1,@Param("status2") String status2);
    Boolean checkRepair(@Param("repairId") int repairId,@Param("check") String check);
    //批准或拒绝后更改repair_satus状态
    Boolean updateRepairStatus(@Param("repairId") int repairId,@Param("status") String status);

    //查询repair_status，维修中/拒绝
    List<Repair> queryRepairByStatus2(@Param("status1") String status1,@Param("status2") String status2);



}
